<?php

use Drupal\shusy_store\Entity\ShusyStore;
use Drupal\shusy_team_achievement\Entity\ShusyTeamAchievement;

function shusy_team_achievement_shusy_team_achievement_add_page() {
  $e = new ShusyTeamAchievement();
  module_load_include('inc', 'shusy_team_achievement', 'shusy_team_achievement.forms');
  return drupal_get_form('shusy_team_achievement_shusy_team_achievement_entity_form', $e, 'add');
}

function shusy_team_achievement_shusy_team_achievement_view_page(ShusyTeamAchievement $e) {
  return entity_view($e->entityType(), [$e]);
}

function shusy_team_achievement_shusy_team_achievement_edit_page(ShusyTeamAchievement $e) {
  module_load_include('inc', 'shusy_team_achievement', 'shusy_team_achievement.forms');
  return drupal_get_form('shusy_team_achievement_shusy_team_achievement_entity_form', $e, 'edit');
}

function shusy_team_achievement_shusy_team_achievement_delete_page(ShusyTeamAchievement $e) {
  module_load_include('inc', 'shusy_team_achievement', 'shusy_team_achievement.forms');
  return drupal_get_form('shusy_team_achievement_shusy_team_achievement_delete_form', $e);
}

function shusy_team_achievement_user_add_page($account) {
  $e = new ShusyTeamAchievement();
  $e->uid = $account->uid;
  module_load_include('inc', 'shusy_team_achievement', 'shusy_team_achievement.forms');
  return drupal_get_form('shusy_team_achievement_shusy_team_achievement_entity_form', $e, 'add');
}

function shusy_team_achievement_shusy_store_add_page(ShusyStore $store) {
  $e = new ShusyTeamAchievement();
  $e->uid = $store->uid;
  module_load_include('inc', 'shusy_team_achievement', 'shusy_team_achievement.forms');
  return drupal_get_form('shusy_team_achievement_shusy_team_achievement_entity_form', $e, 'add');
}
